const Router = require('koa-router');
const {verifyAuth} = require('../middleware/auth.middleware');
const {removeWall} = require('../middleware/file.middleware');
const {wallInfo, list, remove} = require('../controller/wall.contoller');
const wallRouter = new Router({prefix: "/wall"});

// 获取壁纸图片
wallRouter.get("/:filename", wallInfo);
// 获取所有壁纸
wallRouter.get("/list/:userId", list);
// 删除某张壁纸
wallRouter.delete("/", verifyAuth, removeWall, remove);

module.exports = wallRouter;
